﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Web.Script.Serialization;
using System.Collections.Generic;
using HMS.BL;
using HMS.Common;
using HMS.DL;



namespace HMS.PL.Forms
{

    public partial class DashboardCallback : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            //Response.AddHeader("","");
            if (IsPostBack == false)
            {

                string strOpern = String.IsNullOrEmpty(Request.QueryString["operation"]) ? "" : Request.QueryString["operation"].ToString();
                DashboardData objNodeData = new DashboardData();

                if (String.IsNullOrEmpty(Request.QueryString["reconstruct"]) == false)
                {
                    return;
                }
                switch (strOpern)
                {

                    case "get_data":
                        objNodeData.ListId = String.IsNullOrEmpty(Request.QueryString["list_id"]) ? 0 : Convert.ToInt32(Request.QueryString["list_id"].ToString());
                        objNodeData.dimTableName = Request.QueryString["dimtable_name"].ToString();
                        objNodeData.charttype = Request.QueryString["charttype"].ToString();
                        objNodeData.chartfield = Request.QueryString["chartfield"].ToString();//chartfield
                        Response.Write(objNodeData.GetData());
                        break;                  
                    default:
                        // Response.Write(objNodeData.GetHierarchies());
                        break;
                }
            }
        }

    }
}